Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gate LLVMRustHasFeature on LLVM_RUSTLLVM #43579

Merged
merged 1 commit into from
Aug 2, 2017

Conversation

cuviper
Copy link
Member

@cuviper cuviper commented Aug 1, 2017

Commit c471020 in #43492 make LLVMRustHasFeature "more robust"
by using getFeatureTable(). However, this function is specific to
Rust's own LLVM fork, not upstream LLVM-4.0, so we need to use
#if LLVM_RUSTLLVM to guard this call.

Closes #43555.

Commit c471020 in rust-lang#43492 make `LLVMRustHasFeature` "more robust"
by using `getFeatureTable()`.  However, this function is specific to
Rust's own LLVM fork, not upstream LLVM-4.0, so we need to use
`#if LLVM_RUSTLLVM` to guard this call.
@rust-highfive
Copy link
Collaborator

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton
Copy link
Member

@bors: r+

Thanks!

@bors
Copy link
Contributor

bors commented Aug 1, 2017

📌 Commit 881a724 has been approved by alexcrichton

@cuviper
Copy link
Member Author

cuviper commented Aug 1, 2017

More generally, I worry that this is a regression in #[cfg(target_feature = "...")] as it works today, especially since that's used in std itself. If I understand correctly, we previously would have detected features in any case, but now we only can on LLVM-4 -- or really rust/src/llvm only?

cc #29717 @lu-zero

@alexcrichton
Copy link
Member

Yeah I think this is fine for now in terms of fixing the regression, but certainly before stabilizing target_feature we need to fix this in LLVM proper upstream!

@lu-zero
Copy link
Contributor

lu-zero commented Aug 1, 2017

The vaguely annoying issue is that the feature check before was working as long you do not try to expose more features than the ones exposed by the earliest version of LLVM supported.

Since I wanted to expose more features on PowerPC I ended up trying to avoid segfaulting on power8-altivec on LLVM-3.7.

Thanks for the fix to my mistake on the guards!

@ishitatsuyuki
Copy link
Contributor

Can you close #43555 as a part of description?

@cuviper
Copy link
Member Author

cuviper commented Aug 1, 2017

Sure, updated.

@bors
Copy link
Contributor

bors commented Aug 2, 2017

⌛ Testing commit 881a724 with merge f5f58d0...

bors added a commit that referenced this pull request Aug 2, 2017
Gate LLVMRustHasFeature on LLVM_RUSTLLVM

Commit c471020 in #43492 make `LLVMRustHasFeature` "more robust"
by using `getFeatureTable()`.  However, this function is specific to
Rust's own LLVM fork, not upstream LLVM-4.0, so we need to use
`#if LLVM_RUSTLLVM` to guard this call.

Closes #43555.
@bors
Copy link
Contributor

bors commented Aug 2, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing f5f58d0 to master...

@bors bors merged commit 881a724 into rust-lang:master Aug 2, 2017
@cuviper cuviper deleted the extern-llvm-features branch September 26, 2017 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants